package housekeeping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import housekeeping.pojo.UserAccounts;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @version 1.0
 * @Author Du
 * @Date 2025/7/7 16:30
 * @注释 用户注册数据访问接口
 */
@Mapper
public interface UserRegisterMapper extends BaseMapper<UserAccounts> {

    @Insert("INSERT INTO user_accounts (account,password,role) VALUES (#{account},#{password},#{role})")
    int insertPartial(@Param("account") String phone,@Param("password") String password, @Param("role") String role);

    @Insert("INSERT INTO worker (name,phone) VALUES ('新员工',#{phone})")
    int insertworker(@Param("phone") String phone);

    @Insert("INSERT INTO client (name,phone) VALUES ('新用户',#{phone})")
    int insertclient(@Param("phone") String phone);
}
